 
import type { InjectionKey, Ref } from "vue"

export type AgentItem = {
  name: string
  icon: string
  apiKey: string
}

export enum TimeType {
  Day = 'day',
  Week = 'week',
  Month = 'month',
  Year = 'year',
}

export type HistoryItem = {
  time: string
  content: string
  id: string | number
}

export type HistoryList = {
  timeType: TimeType
  list: HistoryItem[]
}



export interface ActiveIdContext {
  activeId: Ref<string | number>
  updateActiveId: (id: string | number) => void
}

export const activeIdKey = Symbol() as InjectionKey<ActiveIdContext>

export interface ShowHistoryContext {
  showHistory: Ref<boolean>
  toggleHistory: () => void
  fullScreen?: Ref<boolean>
  toggleFullScreen?: () => void
  closeAgent?: () => void
  handleAgentNav?: (str: { path: string, id: string, camera: string, dz: string }) => void
  getToken?: () => void
}

export const showHistoryKey = Symbol() as InjectionKey<ShowHistoryContext>

export interface VoiceContext {
  isVoice: Ref<boolean>
  toggleVoice: () => void
  videoText: Ref<string>
}

export const voiceKey = Symbol() as InjectionKey<VoiceContext>

export interface ChatApiContext {
  chatApi: any
  chatToTop: (content: unknown) => void
}

export const chatApiKey = Symbol() as InjectionKey<ChatApiContext>

